/*
    Created by IntelliJ IDEA.
    @Auther: gaozhe
    @Date: 2020/5/15 上午 10:52
    
*/
package service.serviceImpl;

import dao.Impl.UserDaoImpl;
import dao.UserDao;
import pojo.User;
import service.UserService;

public class UserServiceImpl implements UserService {
    private UserDao userDao = new UserDaoImpl();

    public User userLoginService(User user) {
        System.out.println("UserServiceImpl: "+user.getUserName()+":"+user.getPassWord());
        return userDao.findUserByUsernameAndPassword(user.getUserName(),user.getPassWord());
    }

    public boolean registerService(User user) {
        return userDao.saveInformation(user);
    }
}
